﻿@{	
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        //initControl();
        if (!!keyValue) {
            $.ajax({
                url: "/WeChat/WxUserInfo/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);

                    $("#headImg").attr("src", $("#F_HeadImgUrl").val());
                }
            });
        }
    });
    function initControl() {
        $("#F_OrganizeId").bindSelect({
            url: "/SystemManage/Organize/GetTreeSelectJson",
        });
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/WeChat/WxUserInfo/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function() {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        });
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">

            <tr>
                <th class="formTitle">编号</th>
                <td class="formValue">
                    <input id="F_Id" name="F_Id" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">头像</th>
                <td class="formValue">
                    <input id="F_HeadImgUrl" name="F_HeadImgUrl" type="hidden" class="form-control required" placeholder="" />
                    <div class="form-control" style="height: 220px;">
                        <img id="headImg" width="200px" height="200px" />
                    </div>
                </td>
            </tr>
            <tr>
                <th class="formTitle">OpenId</th>
                <td class="formValue">
                    <input id="F_OpenId" name="F_OpenId" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">昵称</th>
                <td class="formValue">
                    <input id="F_NickName" name="F_NickName" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">性别</th>
                <td class="formValue">
                    <select id="F_Sex" name="F_Sex" class="form-control required">
                        <option value="0">未知</option>
                        <option value="1">男</option>
                        <option value="2">女</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="formTitle">语言</th>
                <td class="formValue">
                    <input id="F_Language" name="F_Language" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">城市</th>
                <td class="formValue">
                    <input id="F_City" name="F_City" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">省份</th>
                <td class="formValue">
                    <input id="F_Province" name="F_Province" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">国家</th>
                <td class="formValue">
                    <input id="F_Country" name="F_Country" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">关注时间</th>
                <td class="formValue">
                    <input id="F_SubscribeTime" name="F_SubscribeTime" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">备注</th>
                <td class="formValue">
                    <input id="F_Remark" name="F_Remark" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">分组ID</th>
                <td class="formValue">
                    <input id="F_GroupId" name="F_GroupId" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">创建时间</th>
                <td class="formValue">
                    <input id="F_CreatorTime" name="F_CreatorTime" type="text" class="form-control required" placeholder="" />
                </td>
            </tr>
        </table>
    </div>
</form>